// 导入组件

import DeviceManager from '@/views/manager/deviceManager/DeviceManager.vue'
import EnvironmentalManager from '@/views/manager/deviceManager/EnvironmentalManager.vue'
import FertilizerManager from '@/views/manager/deviceManager/FertilizerManager.vue'
import MonitorManager from '@/views/manager/deviceManager/MonitorManager.vue'

const Layout = () => import('@/layout/index.vue')
const FarmManger = () => import('@/views/manager/farmManager/FarmManger.vue')
const UserManager = () => import('@/views/manager/userManager/UserManager.vue')
const RoleManager = () => import('@/views/manager/userManager/RoleManager.vue')
const MyFarm = () => import('@/views/manager/farmManager/MyFarm.vue')
const PasswordManager = () =>
  import('@/views/manager/userManager/PasswordManager.vue')
const NoticeManager = () =>
  import('@/views/manager/noticeManager/NoticeManager.vue')
const FarmAnalysisData = () =>
  import('@/views/manager/farmManager/FarmAnalysisData.vue')

// 导出该组件
export default [
  {
    path: '/fabank',
    component: Layout,
    name: 'fabank',
    meta: {
      title: '基地管理',
    },
    icon: 'Discount',
    children: [
      {
        path: '/fabankChildren',
        component: FarmManger,
        name: 'fabankChildren',
        meta: {
          title: '基地管理',
        },
      },
    ],
  },
  {
    path: '/fanotice',
    component: Layout,
    name: 'fanotice',
    meta: {
      title: '通知发布',
    },
    icon: 'Notification',
    children: [
      {
        path: '/fanotices',
        component: NoticeManager,
        name: 'fanotices',
        meta: {
          title: '通知发布',
        },
        icon: 'Notification',
      },
    ],
  },
  {
    path: '/fausers',
    component: Layout,
    name: 'fausers',
    meta: {
      title: '用户管理',
    },
    icon: 'User',
    children: [
      {
        path: '/userManager',
        component: UserManager,
        name: 'userManager',
        meta: {
          title: '用户管理',
        },
        icon: 'InfoFilled',
      },
      {
        path: '/roleManger',
        component: RoleManager,
        name: 'roleManger',
        meta: {
          title: '角色管理',
        },
        icon: 'HelpFilled',
      },
    ],
  },
  {
    path: '/faanalysis',
    component: Layout,
    name: 'faanalysis',
    meta: {
      title: '农业大数据分析',
    },
    icon: 'Search',
    children: [
      {
        path: '/faanalysisData',
        component: FarmAnalysisData,
        name: 'faanalysisData',
        meta: {
          title: '农业大数据分析',
        },
        icon: 'Search',
      },
    ],
  },
  {
    path: '/respwd',
    component: Layout,
    name: 'respwd',
    meta: {
      title: '密码修改',
    },
    icon: 'Edit',
    children: [
      {
        path: '/resspwd',
        component: PasswordManager,
        name: 'resspwd',
        meta: {
          title: '密码修改',
        },
      },
    ],
  },

  {
    path: '/myfarm',
    component: Layout,
    name: 'myfarm',
    meta: {
      title: '我的基地',
    },
    icon: 'Discount',
    children: [
      {
        path: '/myfarmChildren',
        component: MyFarm,
        name: 'myfarmChildren',
        meta: {
          title: '我的基地',
        },
      },
    ],
  },
  {
    path: '/mydevice',
    component: Layout,
    name: 'mydevice',
    meta: {
      title: '我的智能设备',
    },
    icon: 'Discount',
    children: [
      {
        path: '/deviceManager',
        component: DeviceManager,
        name: 'deviceManager',
        meta: {
          title: '设备管理',
        },
      },
      {
        path: '/environmental',
        component: EnvironmentalManager,
        name: 'environmental',
        meta: {
          title: '智能环境监测',
        },
      },
      {
        path: '/fertilizer',
        component: FertilizerManager,
        name: 'fertilizer',
        meta: {
          title: '智能水肥设备',
        },
      },
      {
        path: '/monitor',
        component: MonitorManager,
        name: 'monitor',
        meta: {
          title: '智能视频监控',
        },
      },
    ],
  },
]
